package com.itheima.tlias.web.resolver;

import com.itheima.tlias.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author ghy
 * @version 1.0.1
 * @date 2024-01-28 15:16:58
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result handException(Exception e){
        return Result.error(e.getMessage());
    }

}
